<template>
  <div>
    <nav-bar :title="title" :isShow="false"></nav-bar>
    <van-cell title="品鉴卡核销信息" />
    <van-cell-group>
      <van-cell title="品鉴名称:" :value="record.card_name" />
      <van-cell title="商家名称:" :value="record.retailer_name" />
      <van-cell title="客户姓名:" :value="record.name" />
      <van-cell title="商家姓名:" :value="record.r_name"/>
      <van-cell title="核销时间:" :value="record.confirm_time" />
    </van-cell-group>
  </div>
</template>

<script>
import NavBar from "@/components/NavBar";
import { getWxClientSampleRecordById } from "@/api/card";


export default {
  name: "SampleCardConfirmInfo",
  components: {
    NavBar,
  },

  computed: {},

  props: ["record_id"],

  data() {
    return {
      title: this.$route.meta.title,
      record: {},
    };
  },

  created() {
    this.getRecordInfo();
  },

  methods: {
    getRecordInfo() {

      getWxClientSampleRecordById(this.record_id)
        .then((res) => {
          console.log(res);
          this.record = res.data;
        })
        .catch((error) => {
          console.log(error);
          this.$toast(error.response.data.message);
        });
    },
  },
};
</script>

<style  scoped>
.van-cell__value {
  flex: 5;
  text-align: left;
}

</style>